package bank;

import java.util.Date;
/**
 * 
 */

/**
 * @author Dennis Post
 *
 */
public final class Girokonto extends BankAccount {

	/**
	 * Constructor Girokonto without specific currency
	 * @param cust
	 * @param creationDate
	 * @param employer
	 */
	public Girokonto (Customer cust, Date creationDate, Employer employer) {
		
		// int blz = 23054620; // Das ist unsere Bankleitzahl für Girokonten
		super(cust, creationDate, employer, Constants.BLZ);
		this.maxDispo = 0f;
		
		girokontoCreationSuccess();
	}
	
	/**
	 * Constructor Girokonto with specific currency
	 * @param cust
	 * @param creationDate
	 * @param employer
	 * @param currency
	 */
	public Girokonto (Customer cust, Date creationDate, Employer employer, int currency) {
		
		// int blz = 23054620; // Das ist unsere Bankleitzahl für Girokonten
		super(cust, creationDate, employer, Constants.BLZ, currency);
		this.maxDispo = 0f;
		
		girokontoCreationSuccess();
		
	}
	
	/**
	 * Prints a GirokontoCreation success message
	 */
	private void girokontoCreationSuccess () {
		System.out.println("Girokonto für " + this.customer.getFormattedName() + " wurde angelegt:\n" +
				"IBAN: " + this.iban + "\n" +
						"BIC: " + this.bic + ".\n");
	}
	
	/**
	 * Closes the Girokonto and transfers any positive value to a given BankAccount
	 * @return Closing succeed? true/false
	 */
	public boolean closeGirokonto() {
		
		return true;
	}

}
